<link rel="stylesheet" type="text/css" href="<?= base_url() ?>file/js/easyui/themes/gray/easyui.css"> 
<link rel="stylesheet" type="text/css" href="<?= base_url() ?>file/js/easyui/themes/icon.css">
<link rel="stylesheet" href="<?= base_url() ?>file/js/jquery-ui-1.8.17.custom/development-bundle/themes/ui-lightness/jquery.ui.all.css">

<h2>Upload Target Sales Manual </h2>
<br />

<?php if($error) { ?>
      <div class="error-box">
            <img src="<?=base_url()?>file/images/cross.png" alt="close" class="tutup"/>
            <?php echo $error; ?>
      </div>
<?php } ?>
<?php 
/*      echo form_dropdown('getMonth',$choose_month,'next_1_month'); */
      echo form_open_multipart('index.php/upload_target/upload', 'id="upload-mfino" '); 
      echo form_upload('file_excel', '', 'id="file-name"');
?>
<hr/>
<div id="f1_upload_process">
      <p>Please, be patient while your data being insert into database
      <p id="progressbar"></p>
</div>
<?php 
      echo form_submit('', 'Execute Query', 'id="execute" onClick="startUpload()"');
      echo form_reset('', 'Cancel', 'id="cancel"');
?>
<!-- <iframe id="upload_target" name="upload_target" src="#" style="width:0;height:0;border:0px solid #fff;"></iframe> -->
<?php echo form_close(); ?>


<script type="text/javascript">
$(document).ready(function(){

      $('#progressbar').hide();
      $('#f1_upload_process').dialog({ 
            dialogClass: "alert" ,
            height: '100',
            draggable: false,
            modal: true,
            resizable: false,
            autoOpen: false
      });
      $( "#progressbar" ).progressbar({value: 100});
      $('.tutup').click(function(){
            $('.error-box').hide('slow');
      });
});

function startUpload(){
      $('.error-box').hide('slow');
      $('#f1_upload_process').dialog('open');
      $('#progressbar').show();
      return true;
}

</script>
